home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / tvision / dpmi / dpmirun / dpmirun.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-29  |  1.7 KB  |  72 lines

  1. //=====================================================================
  2. //
  3. //  dpmirun.h
  4. //
  5. //  header file for dpmirun
  6. //
  7. //  Copyright (c) 1994, Kevin Morgan, All rights reserved.
  8. //
  9. //=====================================================================
  10. #ifndef __DPMIRUN_H__
  11. #define __DPMIRUN_H__
  12. #include <stdio.h>
  13. #include <fcntl.h>
  14. #include <string.h>
  15. #include <sys\types.h>
  16. #include <io.h>
  17. #include <stdlib.h>
  18. #include <dos.h>
  19. #include <conio.h>
  20. #include <setjmp.h>
  21. #include <stdarg.h>
  22. #include "dpmish.h"
  23. #include "dosext.h"
  24.  
  25. typedef unsigned char BYTE;
  26.  
  27. typedef unsigned int WORD;
  28.  
  29. typedef unsigned long DWORD;
  30.  
  31. typedef unsigned int Selector;
  32.  
  33. //=====================================================================
  34. //
  35. // ModuleLoader
  36. //
  37. // this is an abstract class to represent the program loader.
  38. // We hide the gory details in a subclass
  39. //
  40. //=====================================================================
  41. class near ModuleLoader {
  42.     public:
  43.         ModuleLoader() {}
  44.         virtual int loadErrors() = 0;
  45.         virtual void adjustSelectors() = 0;
  46.         virtual void _far *entryPoint() = 0;
  47.         virtual char *describeFaultPc(WORD& nearCs, WORD cs, WORD ip) = 0;
  48.         virtual void far *getStack(unsigned) = 0;
  49.         virtual void loadExecutable(char *) = 0;
  50. };
  51.  
  52. ModuleLoader *newModuleLoader();
  53.  
  54. void kprintf(char *,...);
  55.  
  56. void dprintf(char *,...);
  57.  
  58. void initComm(int,int,int);
  59.  
  60. void termComm(int);
  61.  
  62. void readComm(int, CommRequest far *);
  63.  
  64. void writeComm(int, CommRequest far *);
  65.  
  66. int handleInt86(int intNr, REGS far *inregs, REGS far *outregs);
  67.  
  68. int handleInt86x(int intNr, REGS far *inregs, REGS far *outregs, 
  69.                 SREGS far *segregs);
  70.  
  71. #endif
  72.